import { useState } from "react"

export default function ChangeMsg() {

    const [initName, setInitName] = useState('aaa')

    const changeName = (data: string) => {
        setInitName(data)
    }

  return (
    <div>
        我叫： {initName}
        <button onClick={() => changeName('阿唯')}>修改名字</button>
    </div>
  )
}
